package com.ruoyi.common.enums;

import java.util.List;

/**
 * 用户状态
 *
 * @author ruoyi
 */
public enum PeopleType {
    // 1聚众赌博，2吸毒，3涉暴力行为
    JZDB(1L, "聚众赌博"),
    XD(2L, "吸毒"),
    SBLXW(3L, "涉暴力行为");

    private final Long code;
    private final String name;

    public static String getNameByCode(Long code){
        for (PeopleType peopleType : PeopleType.values()) {
            if (code.equals(peopleType.code)){
                return peopleType.name;
            }
        }
        return "";
    }

    PeopleType(Long code, String info) {
        this.code = code;
        this.name = info;
    }

    public Long getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
